<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>学生活动服务中心一站式服务大厅综合管理系统</title>
<link href="__ROOT__/admin/Public/css/style.css" rel="stylesheet" type="text/css" />
<link href="__ROOT__/admin/Public/css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__ROOT__/admin/Public/js/showmenu.js"></script>
<script type="text/javascript" src="__ROOT__/admin/Public/js/jquery.js"></script>
<script type='text/javascript' src='__ROOT__/admin/Public/js/kindedit/kindeditor-min.js'></script>
<script type='text/javascript' src='__ROOT__/admin/Public/js/kindedit/lang/zh_CN.js'></script>
<script type="text/javascript" src="__ROOT__/admin/Public/js/keload.js"></script>
<script type="text/javascript" src="__ROOT__/admin/Public/js/DatePicker/WdatePicker.js"></script>
<script type="text/javascript" language="javascript">
	$(document).ready(function() {
		$("#dropFrame").val('{$data['type']}');
		$("#dropLang").val('{$data['type1']}');
		if({$data['type1']}==2){
			$("#picupload").css("display","block");
		}else{
			$("#picupload").css("display","none");
		}
	});
	$(function(){
	   $("#dropLang").unbind("change", eDropLangChange).bind("change", eDropLangChange);
	   $("#dropFrame").unbind("change", eDropFrameChange).bind("change", eDropFrameChange);
	});
	var eDropLangChange = function(){
	  var selectedValue = $(this).val();
	  $("#dropFrame").children("span").each(function(){
		$(this).children().clone().replaceAll($(this));
	  });
	  if(parseInt(selectedValue) != 0){
		$("#dropFrame").children("option[parentid!='" + selectedValue + "'][value!='0']").each(function(){
		  $(this).wrap("<span style='display:none'></span>");
		});
	  }
	  if(parseInt(selectedValue)==2){
		$("#picupload").css("display","block");
	  }else{
		$("#picupload").css("display","none");
	  }
	};
	var eDropFrameChange = function(){
	  $("#dropLang").val($(this).children("option:selected").attr("parentid"));
	  var selectedValue = $(this).val();
	  if(selectedValue==="活动动态图片"){
		$("#size").text("(建议大小300*150像素)");
		$("#picupload").css("display","block");
	  }
	  else if(selectedValue==="首页图片切换"){
		$("#size").text("(建议大小300*180像素)");
		$("#picupload").css("display","block");
	  }
	  else if(selectedValue==="信息公示图片"){
		$("#size").text("(建议大小250*150像素)");
		$("#picupload").css("display","block");
	  }
	  else if(selectedValue==="业务介绍图片"){
		$("#size").text("(建议大小250*150像素)");
		$("#picupload").css("display","block");
	  }
	  else if(selectedValue==="最美大厅"){
		$("#size").text("(建议大小200*120像素)");
		$("#picupload").css("display","block");
	  }else{
		$("#picupload").css("display","none");
	  }
	};
</script>
<script type="text/javascript" language="javascript">
function pickedFunc(){
 $dp.$('d523_y').value=$dp.cal.getP('y');
 $dp.$('d523_M').value=$dp.cal.getP('M');
 $dp.$('d523_d').value=$dp.cal.getP('d');
 $dp.$('d523_HH').value=$dp.cal.getP('H');
 $dp.$('d523_mm').value=$dp.cal.getP('m');
 $dp.$('d523_ss').value=$dp.cal.getP('s');
 }
</script>
</head>

<body>
	<include file="./admin/Tpl/Public/head.html"/>
	<include file="./admin/Tpl/Public/left.html"/>
	<div class="rrcc" id="RightBox">
	<div class="center" id="Mobile" onclick="show_menuC()"></div>
	<div class="right" id="li019">
		<div class="right01"><img src="__ROOT__/admin/Public/img/admin/04.gif" /> 新闻资讯管理 &gt; <span>文章/图文发布系统</span></div>
		<div class="right02">
			<form action="__URL__/modarticle"  method="post" class="div" enctype="multipart/form-data">
			<input type="hidden" value="{$data['id']}" name="id"/>
				<br/>
				<div class="stitle">修改文章/图文</div>
				<hr/>
				<div>
				<select id="dropLang" name="type1">
					<option value="0">请选择类型</option>
					<option value="1">文章</option>
					<option value="2">图文</option>
				</select>
				<select id="dropFrame" name="type">
					<option value="0">请选择类别</option>
					<option value="通知公示" parentid="1">通知公示</option>
					<option value="活动动态" parentid="1">活动动态</option>
					<option value="活动动态图片" parentid="2">活动动态图文</option>
					<option value="首页图片切换" parentid="2">首页图文</option>
					<option value="信息公示图片" parentid="2">信息公示图文</option>
					<option value="业务介绍图片" parentid="2">业务介绍图文</option>
					<option value="最美大厅" parentid="2">最美大厅图文</option>
				</select>
				请选择发布日期<input class="Wdate" type="text" name="time" id="time" value="{$data['time']}" onClick="WdatePicker({readOnly:true,dateFmt:'yyyy-MM-dd HH:mm:ss',onpicked:pickedFunc})">
					<input type="hidden" id="d523_y" size="5" name="y"/>
					<input type="hidden" id="d523_M" size="3" name="M"/>
					<input type="hidden" id="d523_d" size="3" name="d"/>
					<input type="hidden" id="d523_HH" size="3" name="h"/>
					<input type="hidden" id="d523_mm" size="3" name="m"/>
					<input type="hidden" id="d523_ss" size="3" name="s"/>
					<input type="hidden" name="time1" value="{$data['time1']}"/>
				</div>
				<hr/>
				请输入标题<input type="text" name="title" style="width:400px;" value="{$data['title']}">
				<textarea id='content' style="width:800px;height:200px;visibility:hidden;" name="content">{$data['content']}</textarea>
				<hr/>
				<div id="picupload" style="display:none;">
				已上传的图片(点击图片查看文章)<br/>
				<if condition="($data['image'] neq '')">
				<a href="__ROOT__/Annonce/article/id/{$data['id']}" target="_blank"><img src="__PUBLIC__/Uploads/s_{$data['image']}" /></a>
				<input type="hidden" value={$data['image']} name='img'/>
				<else/>
				暂未上传图片
				</if>
				<hr/>
				更改图片<span id="size"></span>
				<table cellpadding=3 cellspacing=3 width="450PX">
					<tr>
						<td class="tRight tTop"></td>
						<td class="tLeft tTop">
					<div class="impBtn  fLeft" ><input name="image" id="image" type="file" class="file huge" value="{$data['image']}"/></div>
						<table id='tbl' style="clear:both"></table>
					</td>
					</tr>
				</table>
				<hr/>
				</div>
				<span class="action">操作:</span>
				<input type="submit" class="btn" value="修改"/>
				<input type="button" class="btn" value="返回" onclick="javascript:history.back();"/>
			</form>
		</div>
	</div>
</body>
</html>
